<template>
	<div>
		<el-tabs type="border-card"  @tab-click="tabClick">
			<el-tab-pane label="会员信息">
				<div class="jyWrap">
					<div class="tableWrap">
						<Member/>
					</div>
				</div>
			</el-tab-pane>
			<el-tab-pane label="健身房">
				<div class="jyWrap">
					<div class="tableWrap">
						<BusinessJsf goodsList="goodList"/>
					</div>
				</div>
			</el-tab-pane>
			<el-tab-pane label="酒吧">
				<div class="jyWrap">
					<div class="tableWrap">
						<BusinessJb/>
					</div>
				</div>
			</el-tab-pane>
			<el-tab-pane label="商品管理">
				<div class="jyWrap">
					<div class="tableWrap">
						<Goods/>
					</div>
				</div>
			</el-tab-pane>
			<el-tab-pane label="投资" v-if="userInfo.userName == 'zcq'">
				<div class="jyWrap">
					<div class="tableWrap"><Touzi /></div>
				</div>
			</el-tab-pane>
		</el-tabs>
	</div>
</template>

<script>
import api from '@/api';
import BusinessJsf from './components/business-jsf.vue';
import BusinessJb from './components/business-jb.vue';
import Touzi from './components/touzi.vue';
import Member from './components/member.vue';
import Goods from './components/goods.vue';
export default {
	components: {
		BusinessJsf,
		BusinessJb,
		Touzi,
		Member,
		Goods
	},
	data() {
		return {
			form: {
				name: '',
				region: '',
				date1: '',
				date2: '',
				delivery: false,
				type: [],
				resource: '',
				desc: ''
			},
			tableData: [],
			investmentTable: [],
			userInfo: '',
			table: {
			  loading: false,
			  hasSelect: false,
			  hasClickEvent: false, 
			  highlight: true,
			  labelProps: [
				{ label: "办卡日期", prop: "createTime",width: '200' },
			    { label: "姓名", prop: "userName" },
			    { label: "开卡日期", prop: "startTime" },
			    { label: "编号", prop: "code" },
			    { label: "备注", prop: "remarks", show: "template" },
			    
			  ],    
			  data: []
			}, 
		};
	},
	mounted() {
		if (!sessionStorage.getItem('userInfo')) {
			this.$router.push({ path: '/' });
		} else {
			this.userInfo = JSON.parse(sessionStorage.getItem('userInfo'));
		}
	},
	methods: {
		tabClick(tab, event){
			// alert(1)
		},
		onSubmit() {
			console.log('submit!');
		},
		
	}
};
</script>

<style scoped="scoped">
.jyWrap {
	display: flex;
}
.addWrap {
	margin-left: 120px;
}
</style>
